package shopping;

public class ShoppingCart {
    private int capacity;
    //假定购物车添加商品数量的上限是10；
    private Product[] products=new Product[10];

    public ShoppingCart() {}
    public ShoppingCart(int capacity, Product[] products) {
        this.capacity = capacity;
        this.products = products;
    }

    public ShoppingCart(int capacity) {
        this.capacity = capacity;
    }
    public int getCapacity() {
        return capacity;
    }
    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }
    public Product[] getProducts() {
        return products;
    }
    public void setProducts(Product[] products) {
        this.products = products;
    }

}
